package com.swx.identityservice.dtos.dept;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@ApiModel("输出角色Dto")
public class DeptListOutputDto {
    @ApiModelProperty("角色集合")
    private List<DeptTreeDto> depts;
    @ApiModelProperty("角色总数")
    private long total;

    public void addUser(DeptTreeDto deptTreeDto) {
        if (depts == null)  depts = new ArrayList<>();
        this.depts.add(deptTreeDto);
    }
}
